package net.hcdz.identity.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionSupport;

import net.hcdz.identity.service.IdentityServiceI;
import net.hcdz.identity.util.ResponseJsonUtils;


public class TestAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Autowired
	private IdentityServiceI identityService;
	
	public String Test(){
		
		HttpServletResponse response = ServletActionContext.getResponse();
		Map<String,String> data=new HashMap<String,String>();
		try {
			List<String> datas = identityService.getUserNameAll();
			data.put("message", datas.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
		 ResponseJsonUtils.json(response, data);
		return NONE;
	}
}
